home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-01-06 | 2.1 KB | 75 lines | [TEXT/MPS ] |
- INITOBJECTS = init.c.o ShowINIT.a.o
-
- # DriverGlue must be first for linker.
-
- DRVROBJECTS = DriverGlue.a.o ∂
- drvr.c.o
-
- # Specify any options you want to pass to the compiler(s). -b tells the compiler to
- # put strings in with the current segment, and not in the global data segment.
-
- CPlusOptions = -b -mf
- COptions = -r -b
-
- #
- # Finally, the entire file consists of the DRVR, the INIT.
- # These are included by sampdrvr.r, which simply includes the aforementioned resources...
- #
-
- TestDrvr ƒƒ Init.rsrc drvr.rsrc testdrvr.h testdrvr.r
- rez testdrvr.r -o TestDrvr
- SetFile TestDrvr -c 'tstD' -t 'INIT' -a B
- duplicate TestDrvr "{systemfolder}extensions:"TestDrvr -y
-
- #
- ##################### Compile the INIT #####################
- #
- init.c.o ƒ init.c
- C {COptions} init.c -o init.c.o
-
- ShowINIT.a.o ƒ ShowINIT.a
- asm {AOptions} ShowINIT.a
-
-
- #
- ##################### Compile the DRVR #####################
- #
-
- drvr.c.o ƒ testdrvr.h ∂
- drvr.c
- C {COptions} drvr.c -o drvr.c.o
-
- # Compile the assembly glue object. Usual dependencies
- DriverGlue.a.o ƒ DriverGlue.a DriverGlue.incl.a
- asm -case obj DriverGlue.a
-
- #
- #
- # Link everything for the driver together. -rt specifies the resource type.
- # In this case, it's 'DRVR' with an ID of 0. -m specifies which routine in the
- # object files is the first one, so we tell it to look for the first one in the
- # assembly file. -sn renames the main segment to ".TestDrvr". -ra is pretty
- # self-explanatory, except you have to specify which segment(s) get the resource
- # attributes.
- #
-
- drvr.rsrc ƒƒ {DRVROBJECTS}
- Link -sg .TestDrvr -rt DRVR=0 -m HEADERDEF -c 'RSED' -t 'rsrc' ∂
- -ra ".TestDrvr"=resSysHeap,resLocked,resPreLoad ∂
- {DRVROBJECTS} ∂
- -o drvr.rsrc
-
- #
- # Link everything for the INIT together. Not much here. Much of the same options get
- # passed to the INIT linking as to the DRVR linking. Again, only Interface.o needed.
-
- Init.rsrc ƒƒ {INITOBJECTS} init.r
- Link -rt INIT=1 -m INITMAIN -sg INITMAIN -sn "Main=Install TestDrvr" ∂
- -c 'RSED' -t 'rsrc' ∂
- -ra InitSeg=resSysHeap,resLocked,resPreLoad ∂
- init.c.o ∂
- ShowINIT.a.o ∂
- "{Libraries}"Interface.o ∂
- -o Init.rsrc
- rez init.r -a -o init.rsrc
-